---
title: 注册PXF的jar依赖
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

您使用PXF访问外部系统上存储的数据。根据外部数据的存储，此访问可能需要您安装和/或配置外部数据存储的其他组件或服务。

PXF取决于这些附加组件提供的JAR文件和其他配置信息。`$GPHOME/pxf/conf/pxf-private.classpath`文件标识PXF内部JAR依赖性。在大多数情况下，PXF将管理`pxf-private.classpath`文件，并根据您使用的连接器根据需要添加条目。

如果您需要为PXF添加其他JAR依赖关系，例如JDBC驱动程序JAR文件，则必须登录到Greenplum数据库master主机，将JAR文件复制到PXF用户配置运行时库目录（`$PXF_CONF/lib`）， 将PXF配置同步到每个segment主机，然后在每个主机上重新启动PXF。 例如：

``` shell
$ ssh gpadmin@<gpmaster>
gpadmin@gpmaster$ cp new_dependent_jar.jar $PXF_CONF/lib/
gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster sync
gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster stop
gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster start
```